using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace AC
{
	public partial class FrmHuongDanSuDung : DevExpress.XtraEditors.XtraForm
	{
		public FrmHuongDanSuDung(string filename)
		{
			InitializeComponent();
			string path = RMSM.Session.AppPath;
			path = path.Replace("\\", "/");
			path = "file:///" + path + "hdsd/" + filename;
			if (path.EndsWith(".htm") == false)
				path += ".htm";

			this.wb.Navigate(path);

			this.btnHome.Click += new EventHandler(btnHome_Click);
			this.btnBack.Click += new EventHandler(btnBack_Click);
			this.btnNext.Click += new EventHandler(btnNext_Click);
			this.btnClose.Click += new EventHandler(btnClose_Click);

			this.Shown += new EventHandler(FrmHuongDanSuDung_Shown);
		}

		private void FrmHuongDanSuDung_Shown(object sender, EventArgs e)
		{
			this.wb.Focus();
		}

		private void btnBack_Click(object sender, EventArgs e)
		{
			this.wb.GoBack();
		}

		private void btnNext_Click(object sender, EventArgs e)
		{
			this.wb.GoForward();
		}

		private void btnHome_Click(object sender, EventArgs e)
		{
			string path = RMSM.Session.AppPath;
			path = path.Replace("\\", "/");
			path = "file:///" + path + "hdsd/index.htm";
			this.wb.Navigate(path);
		}

		private void btnClose_Click(object sender, EventArgs e)
		{
			this.Close();
		}
	}
}